package xyz.ddlnt.model.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @author ZZULI_SE 210910
 * @data 2025/4/26 22:55
 */
@Schema(description = "笔记信息表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Note {
    @Schema(description = "笔记id")
    private Long id;
    @Schema(description = "用户 id")
    private Long userId;

    @Schema(description = "笔记标题")
    private String noteTitle;
    @Schema(description = "笔记摘要")
    private String summary;
    @Schema(description = "笔记目录（JSON数组）")
    private String noteDirectory; // JSON 类型
    @Schema(description = "笔记内容")
    private String noteContent;

    @Schema(description = "1 文件夹；2 文件")
    private Integer type;
    @Schema(description = "文件或文件夹的层级：1~5")
    private Integer layer;
    @Schema(description = "文件(夹)的前节点id（帖子id，没有则为0）")
    private Long dirPrevNodeId;
    @Schema(description = "文件(夹)的子节点（JSON数组）")
    private String dirChildNodes;


    @Schema(description = "笔记的前节点（帖子id，没有则为0）")
    private Long prevNodeId;
    @Schema(description = "前节点类型：0 无、1 试题、2 帖子")
    private Integer prevNodeType;
    @Schema(description = "笔记的子节点（笔记id数组）")
    private String childNodes; // JSON 类型  暂不使用

    @Schema(description = "发布状态：0 未发布、1 发布")
    private Integer publishStatus;
    @Schema(description = "帖子 id")
    private Long postId;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;
}